import request from '@/utils/request'

// 获取功能概述
export function getFunctionOverview() {
  return request({
    url: '/dispatch/web/points/getFunctionOverview',
    method: 'get'
  })
}

// 获取监测量下拉列表
export function getMonitoringList(params) {
  return request({
    url: '/dispatch/web/points/monitoringList',
    method: 'get',
    params
  })
}

// 获取常用监测量配置
export function getCommonMonitoringList() {
  return request({
    url: '/dispatch/web/points/getCommonMonitoringList',
    method: 'get'
  })
}

// 新增常用监测量
export function addCommonMonitoring(data) {
  return request({
    url: '/dispatch/web/points/addCommonMonitoring',
    method: 'post',
    data
  })
}

// 删除常用监测量
export function deleteCommonMonitoring(id) {
  return request({
    url: `/dispatch/web/points/deleteCommonMonitoring/${id}`,
    method: 'delete'
  })
}

// 获取常用监测量下拉列表
export function getCommonMonitoringSelectList() {
  return request({
    url: '/dispatch/web/points/select/getCommonMonitoringList',
    method: 'get'
  })
}

// 获取常用筛选配置
export function getCommonFilterList() {
  return request({
    url: '/dispatch/web/points/getCommonFilterList',
    method: 'get'
  })
}

// 新增常用筛选项
export function addCommonFilter(data) {
  return request({
    url: '/dispatch/web/points/addCommonFilter',
    method: 'post',
    data
  })
}

// 删除常用筛选项
export function deleteCommonFilter(id) {
  return request({
    url: `/dispatch/web/points/deleteCommonFilter/${id}`,
    method: 'delete'
  })
}

// 常用监测量 - 设置是否常用 1是 0否
export function setCommonMonitoring(params) {
  return request({
    url: `/dispatch/web/points/setCommonMonitoring`,
    method: 'get',
    params
  })
}

// 设置常用筛选配置  0-停用 1-启用
export function setCommonFilter(params) {
  return request({
    url: `/dispatch/web/points/setCommonFilter`,
    method: 'get',
    params
  })
}